package com.example.demo.Service.impl;

import com.example.demo.Service.IAccountService;
import com.example.demo.dao.IAccountDAO;
import com.example.demo.entity.Account;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AccountServiceImpl implements IAccountService {
    @Autowired
    private IAccountDAO accountDAO;

    @Override
    public int add(Account account) {
       return accountDAO.add(account);
    }

    @Override
    public List<Account> getName(String name) {
        return accountDAO.getName(name);
    }

    @Override
    public List<Account> getAll() {
        return accountDAO.getAll();
    }
}
